package Thread;
class MyThread extends Thread{
    public void run(){
        try{
            Thread.sleep(1000);
        }catch(InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println("t线程启动");
    }
}
public class Dome2 extends Thread{

    public static void main(String[] args){
        Thread t1 = new MyThread();
        Thread t2 = new MyThread();
        Thread t3 = new MyThread();
        t1.start();
        t2.start();
        t3.start();
        while(true) {
            try{
                Thread.sleep(1000);
            }catch(InterruptedException e) {
                e.printStackTrace();
            }
            System.out.println("main线程启动");
        }
    }
}


